package com.opengl.englishwars;


import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MyDatabaseOpenHelper extends SQLiteOpenHelper {

	public final static String DB_NAME = "MyDB";
	public final static int DB_VERSION = 1;
	public static final String PACKAGE_NAME = "com.opengl.englishwars";

	public MyDatabaseOpenHelper(Context context) {
		super(context, DB_NAME, null, DB_VERSION);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void onCreate(SQLiteDatabase arg0) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
		String sql = "DROP TABLE " + DBConstant.QuizTable.TABLE_NAME;
		db.execSQL(sql);
		sql = "DROP TABLE " + DBConstant.SongListTable.TABLE_NAME;
		db.execSQL(sql);
		onCreate(db);
		
	}



}
